﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;

namespace LK.WebAPI.ValidationAttributes
{
    public class FutureTimeAttribute : ValidationAttribute
    {
        public override bool IsValid(object value)
        {
            DateTime t1 = Convert.ToDateTime(value);
            if (t1 > DateTime.Now.AddMinutes(15))
            {
                return false;
            }
            return true;
        }
    }
}
